package simple.utils.data.serializers;

import java.io.IOException;

/**
 * Created by rehak on 5/7/14.
 */
public class ByteSerializer implements Serializer<Byte> {
    @Override
    public byte[] toBytes(Byte aByte) throws IOException {
        return new byte[]{aByte};
    }

    @Override
    public Byte fromBytes(byte[] data) throws IOException {
        return data[0];
    }
}
